package com.cntcdt.api.db.model.base;

import java.io.Serializable;
import java.sql.ResultSet;
import java.util.Date;

/**
 * 这是cdt_consociation_company_divide的数据传输对象基类,直接与表对应<br>
 */
public abstract class ConsociationCompanyDivideModelBase  implements Serializable {

    @Override
	public String toString() {
		return "ConsociationCompanyDivideModelBase [id=" + id + ", divideScale=" + divideScale + ", dividePrice="
				+ dividePrice + ", addTime=" + addTime + ", updateTime=" + updateTime + ", consociationCompanyId="
				+ consociationCompanyId + ", describe=" + describe + ", divideSellLineScale=" + divideSellLineScale
				+ ", lineCost=" + lineCost + ", cdbCost=" + cdbCost + "]";
	}

	private static final long serialVersionUID = 1L;

    /**
     * 属性:id<br>
     */
    private Integer id = 0;
    /**
     * 属性:分成比例<br>
     * 含义:分成比例<br>
     */
    private Double divideScale = 0.0;
    /**
     * 属性:dividePrice<br>
     */
    private Integer dividePrice = 0;
    /**
     * 属性:addTime<br>
     */
    private Date addTime = new Date();
    /**
     * 属性:updateTime<br>
     */
    private Date updateTime = new Date();
    
    private Integer consociationCompanyId = 0;
    
    private String describe;
    
    private Double divideSellLineScale = 0.0;
    
    private Double lineCost = 0.0;
    
    private Double cdbCost = 0.0;

    /**
     *  默认构造方法,构造一个默认的ConsociationCompanyDivideModelBase对象
     */
    public ConsociationCompanyDivideModelBase(){
    }

    /**
     *  构造函数
     *  @param rs 数据库查询结果集
     */
    public ConsociationCompanyDivideModelBase(ResultSet rs){
           try{
               this.id = rs.getInt("id");
               this.divideScale = rs.getDouble("divideScale");
               this.dividePrice = rs.getInt("dividePrice");
               this.addTime = rs.getDate("addTime");
               this.updateTime = rs.getDate("updateTime");
               this.consociationCompanyId = rs.getInt("consociationCompanyId");
               this.divideSellLineScale = rs.getDouble("divideSellLineScale");
               this.lineCost = rs.getDouble("lineCost");
               this.cdbCost = rs.getDouble("cdbCost");
           }catch(Exception e) {
              e.printStackTrace(); 
           }
    }

	public Double getLineCost() {
		return lineCost;
	}

	public void setLineCost(Double lineCost) {
		this.lineCost = lineCost;
	}

	public Double getCdbCost() {
		return cdbCost;
	}

	public void setCdbCost(Double cdbCost) {
		this.cdbCost = cdbCost;
	}

	public Double getDivideSellLineScale() {
		return divideSellLineScale;
	}

	public void setDivideSellLineScale(Double divideSellLineScale) {
		this.divideSellLineScale = divideSellLineScale;
	}

	public String getDescribe() {
		return describe;
	}

	public void setDescribe(String describe) {
		this.describe = describe;
	}

	public Integer getConsociationCompanyId() {
		return consociationCompanyId;
	}

	public void setConsociationCompanyId(Integer consociationCompanyId) {
		this.consociationCompanyId = consociationCompanyId;
	}

	/**
     * 设置属性id<br>
     * @param id 待设置的属性id的值
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取属性id<br>
     * @return 属性id的值
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置属性分成比例<br>
     * 含义:分成比例<br>
     * @param divideScale 待设置的属性分成比例的值
     */
    public void setDivideScale(Double divideScale) {
        this.divideScale = divideScale;
    }

    /**
     * 获取属性分成比例<br>
     * 含义:分成比例<br>
     * @return 属性分成比例的值
     */
    public Double getDivideScale() {
        return divideScale;
    }

    /**
     * 设置属性dividePrice<br>
     * @param dividePrice 待设置的属性dividePrice的值
     */
    public void setDividePrice(Integer dividePrice) {
        this.dividePrice = dividePrice;
    }

    /**
     * 获取属性dividePrice<br>
     * @return 属性dividePrice的值
     */
    public Integer getDividePrice() {
        return dividePrice;
    }

    /**
     * 设置属性addTime<br>
     * @param addTime 待设置的属性addTime的值
     */
    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    /**
     * 获取属性addTime<br>
     * @return 属性addTime的值
     */
    public Date getAddTime() {
        return addTime;
    }

    /**
     * 设置属性updateTime<br>
     * @param updateTime 待设置的属性updateTime的值
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取属性updateTime<br>
     * @return 属性updateTime的值
     */
    public Date getUpdateTime() {
        return updateTime;
    }


    /**
     * 比较两个对象在逻辑上是否相等
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof ConsociationCompanyDivideModelBase)) {
            return false;
        }

        final ConsociationCompanyDivideModelBase otherModel = (ConsociationCompanyDivideModelBase) other;
        if (getId()!=null && !getId().equals(otherModel.getId())) {
            return false;
        }
        return true;
    }

    /**
     * 根据主键生成HashCode
     * @see java.lang.Object#hashCode()
     */
    public int hashCode() {
        StringBuffer buffer = new StringBuffer();
        buffer.append('|').append(id);
        return buffer.toString().hashCode();
    }
}
